<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Manage Trainee</title>
<link rel="stylesheet" type="text/css" href="css/FinalProjectCSS.css" />
<script type="text/javascript">
	function flyToPage(task) {
		 window.history.back();
	}
	
	function viewTrainee(traineeId){
		//alert(traineeId);
		document.forms[0].task.value = "viewTrainee";
		document.forms[0].traineeId.value = traineeId;
		document.forms[0].submit();
		
	}

// 	function showTrainee() {
// 		var batch = document.getElementsByName('cModel.batch')[0].value;
// 		var task = 'showTrainee';

// 		//document.getElementById('insertField').style.display = '';
// 		$.ajax({
// 			type : "POST",
// 			url : "/WebFinalProject/Candidate.do",
// 			data : "cModel.batch=" + batch + "&task=" + task,
// 			success : function(response) {
// 				$('#insertField').html(response);
// 			},
// 			error : function(e) {
// 				alert('Error: ' + e);
// 			}
// 		});
// 		//showSessionCombo();

// 	}
</script>
</head>
<!-- <body onload="javascript:showTrainee();"> -->
<body>
	<center>
		<table width="100%" class="bodyTable boxShadow">

			<!-- Header -->
			<tr>
				<td colspan="2"><%@include file="/include/Header.jsp"%></td>
			</tr>

			<!-- Content -->
			<tr>
				<td rowspan="2" width="200px" class="navigationBox"><%@include
						file="/include/Navigation.jsp"%></td>
				<td align="left" class="headerBox blueBackground">
					User Management > 
					<a href="javascript:flyToPage('manageTrainee');">Manage Trainee</a> >
					Trainee Information
				</td>
			</tr>
			<tr>
				<td align="center" class="contentStyle"><br> <html:form
						action="/Candidate" method="post">
						<html:hidden property="task" name="candidateForm" />
						<html:hidden property="cModel.batch" name="candidateForm" />
						<table border="0" width="450px" class="boxShadow">
							<tr>
								<td colspan="3" align="center" class="headerBox formHeaderBackground">View Trainee</td>
							</tr>
							<!-- <tr>
								<td colspan="3">&nbsp;</td>
							</tr> -->
							<logic:notEmpty name="candidateForm" property="cModel">
									<tr class="formListBackground">
										<td class="formListStyle leftAlign" width="100px">Trainee ID</td>
										<td class="formListStyle" width="10px">:</td>
										<td class="formListStyle leftAlign"><bean:write name="candidateForm" property="cModel.traineeId"></bean:write></td>
									</tr>
									<tr class="formListBackground">
										<td class="formListStyle leftAlign">Batch</td>
										<td class="formListStyle">:</td>
										<td class="formListStyle leftAlign"><bean:write name="candidateForm" property="cModel.batch"></bean:write></td>
									</tr>									
									<tr class="formListBackground">
										<td class="formListStyle leftAlign">User ID</td>
										<td class="formListStyle">:</td>
										<td class="formListStyle leftAlign"><bean:write name="candidateForm" property="cModel.userId"></bean:write></td>
									</tr>
									<tr class="formListBackground">
										<td class="formListStyle leftAlign">First Name</td>
										<td class="formListStyle">:</td>
										<td class="formListStyle leftAlign"><bean:write name="candidateForm" property="cModel.firstName"></bean:write></td>
									</tr>
									<tr class="formListBackground">
										<td class="formListStyle leftAlign">Last Name</td>
										<td class="formListStyle">:</td>
										<td class="formListStyle leftAlign"><bean:write name="candidateForm" property="cModel.lastName"></bean:write></td>
									</tr>
									<tr class="formListBackground">
										<td class="formListStyle leftAlign">BirthPlace</td>
										<td class="formListStyle">:</td>
										<td class="formListStyle leftAlign"><bean:write name="candidateForm" property="cModel.birthPlace"></bean:write></td>
									</tr>
									<tr class="formListBackground">
										<td class="formListStyle leftAlign">BirthDate</td>
										<td class="formListStyle">:</td>
										<td class="formListStyle leftAlign"><bean:write name="candidateForm" property="cModel.birthDte"></bean:write></td>
									</tr>
									<tr class="formListBackground">
										<td class="formListStyle leftAlign">GPA</td>
										<td class="formListStyle">:</td>
										<td class="formListStyle leftAlign"><bean:write name="candidateForm" property="cModel.gpa"></bean:write></td>
									</tr>
									<tr class="formListBackground">
										<td class="formListStyle leftAlign">University</td>
										<td class="formListStyle">:</td>
										<td class="formListStyle leftAlign"><bean:write name="candidateForm" property="cModel.schoolName"></bean:write></td>
									</tr>
									<tr class="formListBackground">
										<td class="formListStyle leftAlign">Major Study</td>
										<td class="formListStyle">:</td>
										<td class="formListStyle leftAlign"><bean:write name="candidateForm" property="cModel.majority"></bean:write></td>
									</tr>									
									<logic:equal value="0" property="cModel.active" name="candidateForm">
										<tr class="formListBackground">
											<td class="formListStyle leftAlign">Status</td>
											<td class="formListStyle">:</td>
											<td class="formListStyle leftAlign">Inactive</td>
										</tr>
									</logic:equal>
									<logic:equal value="1" property="cModel.active" name="candidateForm">
										<tr class="formListBackground">
											<td class="formListStyle leftAlign">Status</td>
											<td class="formListStyle">:</td>
											<td class="formListStyle leftAlign">Active</td>
										</tr>
									</logic:equal>
							</logic:notEmpty>						
							<tr class="formListBackground">
								<td colspan="3" align="center" class="formListStyle">
									<table title="back" style="cursor: pointer;" onclick="javascript:flyToPage('manageTrainee');">
										<tr>
											<td><img src="images/backButton.png"/></td>
											<td><b>&nbsp;Back&nbsp;</b></td>
										</tr>
									</table>
<!-- 									<input type="button" value="Back" class="buttonStyle" onclick="javascript:flyToPage('manageTrainee');"> -->
								</td>
							</tr>
						</table><br>
					</html:form></td>
			</tr>

			<!-- Footer -->
			<tr>
				<td align="center" colspan="2" class="headerBox blueBackground">&copy;
					OME. 2014. All Rights Reserved.</td>
			</tr>
		</table>
	</center>
</body>
</html>



